/*
 * @Author: 高瑞寒 15932717091@163.com
 * @Date: 2022-03-15 18:17:10
 * @LastEditTime: 2022-05-18 15:24:08
 * @LastEditors: 高瑞寒 15932717091@163.com
 * @Description:
 */
import request from '@/utils/request'
// 获取用户列表
export const getUserManagerList = data => {
  return request({
    url: '/user-manage/list',
    params: data
  })
}
// 文件上传
export const userBatchImport = (data) => {
  return request({
    url: '/user-manage/batch/import',
    method: 'POST',
    data
  })
}
// 删除用户
export const deleteUser = (id) => {
  return request({
    url: `/user-manage/detele/${id}`
  })
}
// 获取所有用户
export const getUserManageAllList = () => {
  return request({
    url: '/user-manage/all-list'
  })
}
/**
 *
 * 获取用户详情
 */
export const getUserDetail = (id) => {
  return request({
    url: `/user-manage/detail/${id}`
  })
}
// 为角色分配角色
export const updateUserRoles = (data, id) => {
  return request({
    url: `/user-manage/update-role/${id}`,
    method: 'POST',
    data
  })
}
